Generally, in modern computer systems, some critical resources may always be in shortage as the system becomes more and more complicated. Typically, different executing components may need to race for these resources and block other components from executing. Such contention may greatly affect overall parallel execution and system throughput. For example, in a storage system, lock resources may be utilized to ensure atomic data change. However, because of time cost and memory overheads of a plurality of locks may be very large and their hardware resource utilizations may also very expensive, the number of locks may usually be limited, which may not suffice to separately assign a lock for each object applying for lock resources.
A traditional solution may employ a Hash algorithm or an evenly distributed algorithm to assign the same lock to a plurality of objects for use, i.e., the same lock may be shared by a plurality of objects. However, the plurality of objects sharing the same lock might not be completely independent, but may be correlated with each other. In some cases, a plurality of objects with correlation may highly affect each other, and may cause deterioration of the performance of lock contention. For example, due to their correlation, a plurality of objects with correlations may always need to perform some operations simultaneously. Such operations may cause the plurality of objects to contend for the shared lock, which may cause a plurality of serialized operations, thereby affecting system performance.